/*
 * @Author: 陈俊升 761723995@qq.com
 * @Date: 2023-05-11 18:11:41
 * @LastEditors: 陈俊升 761723995@qq.com
 * @LastEditTime: 2023-12-05 15:35:01
 * @FilePath: /hr_new_vue3/src/apis/management/organization/baseSetting/LegalEntityType/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/* 法律实体类型api */
interface data {
  name: string;
  remark: string;
  id: number;
  enable: string;
}
import { ajaxService } from '@/utils/request';

const env = import.meta.env;
// const baseURL = env.VITE_APP_BASE_URL;
// const baseURL = env.VITE_DEV_BASE_URL;
const baseURL = env.VITE_DEV_BASE_URL;

// 查询表数据
export function getLegalEntityTypeList(params: any) {
  return ajaxService({
    url: '/hr/organization/basic_setting/organizational_settings/legal_entity_type',
    // url: '/organization/set/law/type',
    method: 'get',
    noToken: false,
    params,
    baseURL
  });
}
// 删除表数据
export function removeLegalEntityTypeList(data: any) {
  return ajaxService({
    url: '/hr/organization/basic_setting/organizational_settings/legal_entity_type',
    // url: '/organization/set/law/type',
    method: 'DELETE',
    noToken: false,
    data,
    baseURL
  });
}

//新增表数据
export function addLegalEntityTypeList(data: any) {
  return ajaxService({
    url: '/hr/organization/basic_setting/organizational_settings/legal_entity_type',
    // url: '/organization/set/law/type',
    method: 'post',
    noToken: false,
    data,
    isLoading: true,
    baseURL
  });
}

//修改表数据
export function PutLegalEntityTypeList(data: any) {
  return ajaxService({
    url: '/hr/organization/basic_setting/organizational_settings/legal_entity_type',
    // url: '/organization/set/law/type',
    method: 'put',
    noToken: false,
    data,
    isLoading: true,
    baseURL
  });
}

// 新增编辑查重
export function CheckLegalEntityTypeList(params: any) {
  return ajaxService({
    url: '/hr/organization/basic_setting/organizational_settings/legal_entity_type/repeat',
    // url: '/organization/law/type/repeat',
    method: 'get',
    params,
    baseURL
  });
}
